//
//  SwiftCertificateTests.swift
//  SwiftCertificateTests
//

@testable import SwiftCertificate
import XCTest

class SwiftCertificateTests: XCTestCase {

    override func setUpWithError() throws {
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }

    override func tearDownWithError() throws {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
    }

    func testInitCertificate() throws {
        // This is an example of a functional test case.
        // Use XCTAssert and related functions to verify your tests produce the correct results.
        // Any test you write for XCTest can be annotated as throws and async.
        // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
        // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
        /*
            subject= /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
            issuer= /C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
            serial=254B8A853842CCE358F8C5DDAE226EA4
        */
        let certBytes = Data(_: [    0x30, 0x82, 0x03, 0x83, 0x30, 0x82, 0x02, 0xec,
                                         0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x25,
                                         0x4b, 0x8a, 0x85, 0x38, 0x42, 0xcc, 0xe3, 0x58,
                                         0xf8, 0xc5, 0xdd, 0xae, 0x22, 0x6e, 0xa4, 0x30,
                                         0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
                                         0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, 0x5f,
                                         0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
                                         0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x17, 0x30,
                                         0x15, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0e,
                                         0x56, 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6e,
                                         0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x31, 0x37,
                                         0x30, 0x35, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13,
                                         0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x33,
                                         0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
                                         0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x20,
                                         0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
                                         0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x41, 0x75,
                                         0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x30,
                                         0x1e, 0x17, 0x0d, 0x39, 0x37, 0x30, 0x34, 0x31,
                                         0x37, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
                                         0x17, 0x0d, 0x31, 0x31, 0x31, 0x30, 0x32, 0x34,
                                         0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30,
                                         0x81, 0xba, 0x31, 0x1f, 0x30, 0x1d, 0x06, 0x03,
                                         0x55, 0x04, 0x0a, 0x13, 0x16, 0x56, 0x65, 0x72,
                                         0x69, 0x53, 0x69, 0x67, 0x6e, 0x20, 0x54, 0x72,
                                         0x75, 0x73, 0x74, 0x20, 0x4e, 0x65, 0x74, 0x77,
                                         0x6f, 0x72, 0x6b, 0x31, 0x17, 0x30, 0x15, 0x06,
                                         0x03, 0x55, 0x04, 0x0b, 0x13, 0x0e, 0x56, 0x65,
                                         0x72, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x2c, 0x20,
                                         0x49, 0x6e, 0x63, 0x2e, 0x31, 0x33, 0x30, 0x31,
                                         0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x2a, 0x56,
                                         0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x20,
                                         0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74,
                                         0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65,
                                         0x72, 0x76, 0x65, 0x72, 0x20, 0x43, 0x41, 0x20,
                                         0x2d, 0x20, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x20,
                                         0x33, 0x31, 0x49, 0x30, 0x47, 0x06, 0x03, 0x55,
                                         0x04, 0x0b, 0x13, 0x40, 0x77, 0x77, 0x77, 0x2e,
                                         0x76, 0x65, 0x72, 0x69, 0x73, 0x69, 0x67, 0x6e,
                                         0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x50, 0x53,
                                         0x20, 0x49, 0x6e, 0x63, 0x6f, 0x72, 0x70, 0x2e,
                                         0x62, 0x79, 0x20, 0x52, 0x65, 0x66, 0x2e, 0x20,
                                         0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
                                         0x59, 0x20, 0x4c, 0x54, 0x44, 0x2e, 0x28, 0x63,
                                         0x29, 0x39, 0x37, 0x20, 0x56, 0x65, 0x72, 0x69,
                                         0x53, 0x69, 0x67, 0x6e, 0x30, 0x81, 0x9f, 0x30,
                                         0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
                                         0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81,
                                         0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81,
                                         0x00, 0xd8, 0x82, 0x80, 0xe8, 0xd6, 0x19, 0x02,
                                         0x7d, 0x1f, 0x85, 0x18, 0x39, 0x25, 0xa2, 0x65,
                                         0x2b, 0xe1, 0xbf, 0xd4, 0x05, 0xd3, 0xbc, 0xe6,
                                         0x36, 0x3b, 0xaa, 0xf0, 0x4c, 0x6c, 0x5b, 0xb6,
                                         0xe7, 0xaa, 0x3c, 0x73, 0x45, 0x55, 0xb2, 0xf1,
                                         0xbd, 0xea, 0x97, 0x42, 0xed, 0x9a, 0x34, 0x0a,
                                         0x15, 0xd4, 0xa9, 0x5c, 0xf5, 0x40, 0x25, 0xdd,
                                         0xd9, 0x07, 0xc1, 0x32, 0xb2, 0x75, 0x6c, 0xc4,
                                         0xca, 0xbb, 0xa3, 0xfe, 0x56, 0x27, 0x71, 0x43,
                                         0xaa, 0x63, 0xf5, 0x30, 0x3e, 0x93, 0x28, 0xe5,
                                         0xfa, 0xf1, 0x09, 0x3b, 0xf3, 0xb7, 0x4d, 0x4e,
                                         0x39, 0xf7, 0x5c, 0x49, 0x5a, 0xb8, 0xc1, 0x1d,
                                         0xd3, 0xb2, 0x8a, 0xfe, 0x70, 0x30, 0x95, 0x42,
                                         0xcb, 0xfe, 0x2b, 0x51, 0x8b, 0x5a, 0x3c, 0x3a,
                                         0xf9, 0x22, 0x4f, 0x90, 0xb2, 0x02, 0xa7, 0x53,
                                         0x9c, 0x4f, 0x34, 0xe7, 0xab, 0x04, 0xb2, 0x7b,
                                         0x6f, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81,
                                         0xe3, 0x30, 0x81, 0xe0, 0x30, 0x0f, 0x06, 0x03,
                                         0x55, 0x1d, 0x13, 0x04, 0x08, 0x30, 0x06, 0x01,
                                         0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x44, 0x06,
                                         0x03, 0x55, 0x1d, 0x20, 0x04, 0x3d, 0x30, 0x3b,
                                         0x30, 0x39, 0x06, 0x0b, 0x60, 0x86, 0x48, 0x01,
                                         0x86, 0xf8, 0x45, 0x01, 0x07, 0x01, 0x01, 0x30,
                                         0x2a, 0x30, 0x28, 0x06, 0x08, 0x2b, 0x06, 0x01,
                                         0x05, 0x05, 0x07, 0x02, 0x01, 0x16, 0x1c, 0x68,
                                         0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77,
                                         0x77, 0x77, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x73,
                                         0x69, 0x67, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
                                         0x43, 0x50, 0x53, 0x30, 0x34, 0x06, 0x03, 0x55,
                                         0x1d, 0x25, 0x04, 0x2d, 0x30, 0x2b, 0x06, 0x08,
                                         0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01,
                                         0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07,
                                         0x03, 0x02, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01,
                                         0x86, 0xf8, 0x42, 0x04, 0x01, 0x06, 0x0a, 0x60,
                                         0x86, 0x48, 0x01, 0x86, 0xf8, 0x45, 0x01, 0x08,
                                         0x01, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f,
                                         0x04, 0x04, 0x03, 0x02, 0x01, 0x06, 0x30, 0x11,
                                         0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8,
                                         0x42, 0x01, 0x01, 0x04, 0x04, 0x03, 0x02, 0x01,
                                         0x06, 0x30, 0x31, 0x06, 0x03, 0x55, 0x1d, 0x1f,
                                         0x04, 0x2a, 0x30, 0x28, 0x30, 0x26, 0xa0, 0x24,
                                         0xa0, 0x22, 0x86, 0x20, 0x68, 0x74, 0x74, 0x70,
                                         0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x76,
                                         0x65, 0x72, 0x69, 0x73, 0x69, 0x67, 0x6e, 0x2e,
                                         0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x63, 0x61, 0x33,
                                         0x2e, 0x63, 0x72, 0x6c, 0x30, 0x0d, 0x06, 0x09,
                                         0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
                                         0x05, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x08,
                                         0x01, 0xec, 0xe4, 0x68, 0x94, 0x03, 0x42, 0xf1,
                                         0x73, 0xf1, 0x23, 0xa2, 0x3a, 0xde, 0xe9, 0xf1,
                                         0xda, 0xc6, 0x54, 0xc4, 0x23, 0x3e, 0x86, 0xea,
                                         0xcf, 0x6a, 0x3a, 0x33, 0xab, 0xea, 0x9c, 0x04,
                                         0x14, 0x07, 0x36, 0x06, 0x0b, 0xf9, 0x88, 0x6f,
                                         0xd5, 0x13, 0xee, 0x29, 0x2b, 0xc3, 0xe4, 0x72,
                                         0x8d, 0x44, 0xed, 0xd1, 0xac, 0x20, 0x09, 0x2d,
                                         0xe1, 0xf6, 0xe1, 0x19, 0x05, 0x38, 0xb0, 0x3d,
                                         0x0f, 0x9f, 0x7f, 0xf8, 0x9e, 0x02, 0xdc, 0x86,
                                         0x02, 0x86, 0x61, 0x4e, 0x26, 0x5f, 0x5e, 0x9f,
                                         0x92, 0x1e, 0x0c, 0x24, 0xa4, 0xf5, 0xd0, 0x70,
                                         0x13, 0xcf, 0x26, 0xc3, 0x43, 0x3d, 0x49, 0x1d,
                                         0x9e, 0x82, 0x2e, 0x52, 0x5f, 0xbc, 0x3e, 0xc6,
                                         0x66, 0x29, 0x01, 0x8e, 0x4e, 0x92, 0x2c, 0xbc,
                                         0x46, 0x75, 0x03, 0x82, 0xac, 0x73, 0xe9, 0xd9,
                                         0x7e, 0x0b, 0x67, 0xef, 0x54, 0x52, 0x1a, ])

        let newCert = try Certificate(derRepresentation: certBytes)
        XCTAssertNotNil(newCert)

        let mail_google_com = Data(_: [
            0x30, 0x82, 0x03, 0x22, 0x30, 0x82, 0x02, 0x8b, 0xa0, 0x03, 0x02, 0x01,
            0x02, 0x02, 0x10, 0x2b, 0x9f, 0x7e, 0xe5, 0xca, 0x25, 0xa6, 0x25, 0x14,
            0x20, 0x47, 0x82, 0x75, 0x3a, 0x9b, 0xb9, 0x30, 0x0d, 0x06, 0x09, 0x2a,
            0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, 0x4c,
            0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x5a,
            0x41, 0x31, 0x25, 0x30, 0x23, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x1c,
            0x54, 0x68, 0x61, 0x77, 0x74, 0x65, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x75,
            0x6c, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x28, 0x50, 0x74, 0x79, 0x29, 0x20,
            0x4c, 0x74, 0x64, 0x2e, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04,
            0x03, 0x13, 0x0d, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65, 0x20, 0x53, 0x47,
            0x43, 0x20, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x31, 0x31, 0x30,
            0x32, 0x36, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x31,
            0x33, 0x30, 0x39, 0x33, 0x30, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a,
            0x30, 0x69, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
            0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08,
            0x13, 0x0a, 0x43, 0x61, 0x6c, 0x69, 0x66, 0x6f, 0x72, 0x6e, 0x69, 0x61,
            0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x07, 0x14, 0x0d, 0x4d,
            0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x56, 0x69, 0x65, 0x77,
            0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x14, 0x0a, 0x47,
            0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x31, 0x18, 0x30,
            0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x14, 0x0f, 0x6d, 0x61, 0x69, 0x6c,
            0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30,
            0x81, 0x9f, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
            0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81, 0x8d, 0x00, 0x30, 0x81, 0x89,
            0x02, 0x81, 0x81, 0x00, 0xaf, 0x39, 0x15, 0x98, 0x68, 0xe4, 0x92, 0xfe,
            0x4f, 0x4f, 0xf1, 0xbb, 0xff, 0x0d, 0x2e, 0xb0, 0xfe, 0x25, 0xaa, 0xbd,
            0x68, 0x04, 0x67, 0x27, 0xea, 0x6c, 0x43, 0x4c, 0xa7, 0x6d, 0xcb, 0xc8,
            0x8f, 0x7e, 0x81, 0xee, 0x87, 0x26, 0x25, 0x10, 0x12, 0x54, 0x33, 0x9e,
            0xaa, 0x3d, 0x9b, 0x8f, 0x8e, 0x92, 0xb3, 0x4b, 0x01, 0xe3, 0xf9, 0x4a,
            0x29, 0xc3, 0x0f, 0xfd, 0xac, 0xb7, 0xd3, 0x4c, 0x97, 0x29, 0x3f, 0x69,
            0x55, 0xcf, 0x70, 0x83, 0x04, 0xaf, 0x2e, 0x04, 0x6e, 0x74, 0xd6, 0x0f,
            0x17, 0x09, 0xfe, 0x9e, 0x20, 0x24, 0x24, 0xe3, 0xc7, 0x68, 0x9c, 0xac,
            0x11, 0xbd, 0x92, 0xe4, 0xb2, 0x1b, 0x09, 0xf2, 0x02, 0x32, 0xbb, 0x55,
            0x1b, 0x2d, 0x16, 0x5f, 0x30, 0x12, 0x23, 0xe2, 0x4c, 0x4a, 0x8d, 0xc2,
            0xda, 0x3f, 0xe1, 0xb8, 0xbf, 0xf7, 0x3a, 0xb1, 0x86, 0xbe, 0xf0, 0xc5,
            0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xe7, 0x30, 0x81, 0xe4, 0x30,
            0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30,
            0x00, 0x30, 0x36, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x2f, 0x30, 0x2d,
            0x30, 0x2b, 0xa0, 0x29, 0xa0, 0x27, 0x86, 0x25, 0x68, 0x74, 0x74, 0x70,
            0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x74, 0x68, 0x61, 0x77, 0x74,
            0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65,
            0x53, 0x47, 0x43, 0x43, 0x41, 0x2e, 0x63, 0x72, 0x6c, 0x30, 0x28, 0x06,
            0x03, 0x55, 0x1d, 0x25, 0x04, 0x21, 0x30, 0x1f, 0x06, 0x08, 0x2b, 0x06,
            0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05,
            0x05, 0x07, 0x03, 0x02, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8,
            0x42, 0x04, 0x01, 0x30, 0x72, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05,
            0x07, 0x01, 0x01, 0x04, 0x66, 0x30, 0x64, 0x30, 0x22, 0x06, 0x08, 0x2b,
            0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x16, 0x68, 0x74, 0x74,
            0x70, 0x3a, 0x2f, 0x2f, 0x6f, 0x63, 0x73, 0x70, 0x2e, 0x74, 0x68, 0x61,
            0x77, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x3e, 0x06, 0x08, 0x2b,
            0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02, 0x86, 0x32, 0x68, 0x74, 0x74,
            0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x74, 0x68, 0x61, 0x77,
            0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73,
            0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65,
            0x5f, 0x53, 0x47, 0x43, 0x5f, 0x43, 0x41, 0x2e, 0x63, 0x72, 0x74, 0x30,
            0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05,
            0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x35, 0x80, 0x11, 0xcd, 0x52, 0x3e,
            0x84, 0x29, 0xfb, 0xc1, 0x28, 0xe1, 0x20, 0xe5, 0x02, 0x8f, 0x5f, 0x71,
            0x65, 0x58, 0x1d, 0x62, 0x72, 0x57, 0x3c, 0xe6, 0x5e, 0x25, 0x61, 0xd3,
            0xcb, 0xad, 0x22, 0xf8, 0xd8, 0x81, 0xa4, 0xe7, 0xf4, 0xae, 0x7c, 0xd9,
            0xc1, 0x6d, 0xaa, 0x93, 0x0d, 0x62, 0x07, 0x9f, 0xf2, 0x67, 0x47, 0x99,
            0x34, 0x33, 0x4f, 0x3d, 0x02, 0x74, 0xf4, 0x81, 0xd6, 0x38, 0x08, 0x21,
            0xe8, 0xe2, 0xa1, 0xfa, 0x05, 0x41, 0x9c, 0x9c, 0xc9, 0xf9, 0xf3, 0xc8,
            0xa3, 0xee, 0x0d, 0xa5, 0xd7, 0x50, 0x54, 0x5e, 0x2f, 0x7d, 0x79, 0xb7,
            0x7e, 0x0a, 0x7c, 0xb6, 0xe2, 0x2c, 0xa8, 0xae, 0xfe, 0x94, 0xd7, 0xcd,
            0x16, 0x30, 0x71, 0x04, 0xaa, 0x9e, 0x79, 0xc3, 0xd2, 0xb6, 0x24, 0xa7,
            0x25, 0xab, 0xf0, 0x48, 0x8e, 0x2f, 0xc3, 0xa7, 0xbb, 0x50, 0xdd, 0x0f,
            0xcf, 0xb0, ])

        let mail_aarthi = Data(_: [
          0x30, 0x82, 0x03, 0x38, 0x30, 0x82, 0x02, 0x20, 0x02, 0x09, 0x00, 0x8e,
          0xf0, 0xda, 0x79, 0xa8, 0x1a, 0xb2, 0x85, 0x30, 0x0d, 0x06, 0x09, 0x2a,
          0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x5e,
          0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55,
          0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02,
          0x43, 0x41, 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c,
          0x08, 0x53, 0x61, 0x6e, 0x20, 0x4a, 0x6f, 0x73, 0x65, 0x31, 0x0e, 0x30,
          0x0c, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x05, 0x41, 0x70, 0x70, 0x6c,
          0x65, 0x31, 0x1f, 0x30, 0x1d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
          0x0d, 0x01, 0x09, 0x01, 0x16, 0x10, 0x61, 0x61, 0x72, 0x74, 0x68, 0x69,
          0x40, 0x61, 0x70, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x1e,
          0x17, 0x0d, 0x32, 0x31, 0x31, 0x32, 0x30, 0x36, 0x32, 0x32, 0x34, 0x36,
          0x31, 0x35, 0x5a, 0x17, 0x0d, 0x32, 0x32, 0x31, 0x32, 0x30, 0x36, 0x32,
          0x32, 0x34, 0x36, 0x31, 0x35, 0x5a, 0x30, 0x5e, 0x31, 0x0b, 0x30, 0x09,
          0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0b, 0x30,
          0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02, 0x43, 0x41, 0x31, 0x11,
          0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c, 0x08, 0x53, 0x61, 0x6e,
          0x20, 0x4a, 0x6f, 0x73, 0x65, 0x31, 0x0e, 0x30, 0x0c, 0x06, 0x03, 0x55,
          0x04, 0x0a, 0x0c, 0x05, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x31, 0x1f, 0x30,
          0x1d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x01,
          0x16, 0x10, 0x61, 0x61, 0x72, 0x74, 0x68, 0x69, 0x40, 0x61, 0x70, 0x70,
          0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d,
          0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05,
          0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82,
          0x01, 0x01, 0x00, 0xb0, 0xb2, 0x57, 0x30, 0xe0, 0x8b, 0x55, 0x52, 0xf4,
          0xe6, 0x0c, 0xc6, 0x12, 0x87, 0x63, 0x18, 0x3d, 0xb7, 0xa1, 0x2d, 0xfb,
          0x77, 0xaf, 0x6e, 0x16, 0x3c, 0x09, 0x3f, 0xa9, 0x7a, 0x44, 0x35, 0x9c,
          0xe8, 0x52, 0x9a, 0x40, 0x99, 0x7c, 0x44, 0x96, 0xb4, 0xa1, 0x47, 0x6c,
          0x34, 0xc4, 0xf8, 0x7c, 0x2c, 0x7e, 0xd7, 0x9a, 0xce, 0x66, 0x93, 0xf4,
          0xd8, 0xd9, 0xf3, 0x42, 0x14, 0xba, 0xc1, 0x76, 0xf6, 0xd4, 0x66, 0x6f,
          0x02, 0x08, 0x7c, 0x8a, 0x6d, 0xc2, 0x06, 0x65, 0xbd, 0x26, 0x2f, 0x61,
          0xe9, 0xfb, 0x80, 0xe7, 0x47, 0x03, 0x4a, 0x82, 0x37, 0x6d, 0xc5, 0x99,
          0x68, 0xd6, 0x33, 0x67, 0x36, 0xf7, 0x54, 0xec, 0xad, 0x21, 0xf4, 0xb3,
          0x06, 0xb4, 0x43, 0x6d, 0x21, 0x69, 0x94, 0xc1, 0x48, 0x93, 0x85, 0xd9,
          0xf3, 0x75, 0xc8, 0x5e, 0xcd, 0x4e, 0x8b, 0xab, 0x20, 0x20, 0x0a, 0x6b,
          0xd0, 0x72, 0x09, 0x31, 0x0b, 0xe9, 0x70, 0xd3, 0x3b, 0x58, 0x60, 0x05,
          0xce, 0x67, 0x39, 0xce, 0x0a, 0xe8, 0x5a, 0x5f, 0x03, 0x4b, 0x8e, 0x13,
          0x5d, 0x10, 0x93, 0x3d, 0x77, 0xb7, 0x49, 0xfd, 0x8b, 0x3e, 0x9a, 0xd6,
          0x68, 0xdf, 0xfe, 0x9a, 0xe2, 0x65, 0xbd, 0x65, 0xe5, 0xec, 0x07, 0xbb,
          0xe8, 0xa7, 0x02, 0xf5, 0xdb, 0xd6, 0x22, 0x92, 0x62, 0x37, 0xa7, 0x68,
          0x01, 0x59, 0x50, 0x8e, 0x88, 0xaa, 0x69, 0x0c, 0x78, 0x71, 0x4f, 0x8c,
          0xe2, 0x6e, 0x49, 0x95, 0x8b, 0x64, 0xc4, 0x3f, 0x01, 0x3a, 0xe4, 0x13,
          0xda, 0x00, 0x87, 0x42, 0x82, 0x9e, 0x15, 0x8d, 0x1e, 0xe0, 0x48, 0x10,
          0x3c, 0x65, 0xb3, 0x01, 0x56, 0x14, 0x9a, 0x50, 0xa3, 0x28, 0x92, 0x77,
          0x9c, 0xae, 0x44, 0xe9, 0x79, 0x93, 0xe6, 0x25, 0x4c, 0x01, 0x12, 0x75,
          0x1f, 0x04, 0xd8, 0x57, 0x07, 0x42, 0xb3, 0x02, 0x03, 0x01, 0x00, 0x01,
          0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
          0x0b, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x98, 0xb2, 0xef, 0xe2,
          0xdb, 0xc8, 0xd7, 0x86, 0x42, 0xa1, 0xf3, 0xce, 0x65, 0xb0, 0x8a, 0x27,
          0xb7, 0x40, 0xbb, 0xc8, 0xe8, 0x82, 0xc3, 0x2b, 0x62, 0x99, 0x33, 0x71,
          0xb2, 0x03, 0xb7, 0x57, 0x32, 0x4d, 0xa2, 0x19, 0x00, 0x8c, 0x7b, 0xb6,
          0xb5, 0x57, 0x14, 0xd4, 0x6f, 0x4f, 0xd7, 0x9c, 0x12, 0x45, 0xa7, 0x38,
          0x5f, 0x6d, 0x42, 0xa1, 0xa1, 0x65, 0xa9, 0x79, 0x63, 0x32, 0xfd, 0x2d,
          0x89, 0xb4, 0xd6, 0x52, 0xe4, 0x6d, 0x4c, 0x51, 0xd9, 0xa0, 0x32, 0x08,
          0x91, 0x52, 0xe5, 0xfa, 0x7f, 0xf1, 0x6e, 0x76, 0x09, 0xbb, 0x75, 0x0c,
          0x26, 0x4d, 0x13, 0x83, 0x47, 0x36, 0x9e, 0x61, 0x01, 0x60, 0x3c, 0xce,
          0x1d, 0x3e, 0x3f, 0x95, 0x25, 0xfd, 0xc0, 0xde, 0xd7, 0xaf, 0x85, 0xd2,
          0x67, 0xc5, 0xf6, 0x6f, 0x27, 0xa5, 0x15, 0x81, 0xa5, 0x0e, 0x1e, 0x4c,
          0x42, 0x2e, 0xb1, 0xf9, 0x68, 0x4f, 0xb6, 0x2d, 0xd1, 0x85, 0xa8, 0xea,
          0xe0, 0x2a, 0x44, 0xfb, 0xfd, 0x90, 0x7b, 0xda, 0xd0, 0x16, 0xc7, 0xe3,
          0x71, 0x81, 0xaa, 0x50, 0x35, 0xca, 0xc2, 0x2c, 0xd1, 0x2f, 0xea, 0xf6,
          0x80, 0xe5, 0xea, 0x96, 0x72, 0x3d, 0x5f, 0x96, 0xea, 0xe7, 0x7f, 0xe8,
          0xb8, 0x9b, 0xb6, 0xe2, 0x54, 0x0c, 0xc3, 0x4c, 0xfc, 0x16, 0xff, 0x42,
          0xc6, 0xae, 0x23, 0x6e, 0x76, 0x23, 0xd1, 0xe3, 0x39, 0xbe, 0x2c, 0xce,
          0x8e, 0xa5, 0xbb, 0x0c, 0x87, 0x0e, 0x24, 0x7b, 0x8f, 0x64, 0x4f, 0x7e,
            0xc7, 0x9e, 0xcc, 0xac, 0x60, 0x82, 0x6d, 0x71, 0xbc, 0xd2, 0x75, 0xf2,
            0x0d, 0x85, 0x76, 0xd6, 0x84, 0xb2, 0x4e, 0xc4, 0xcb, 0x08, 0x1f, 0xeb,
            0x68, 0x1b, 0x0d, 0x49, 0x8a, 0x04, 0x1a, 0xd8, 0xae, 0xc5, 0xb4, 0xc8,
            0xcd, 0x11, 0x55, 0xc2, 0xea, 0x0d, 0x6c, 0xbb, 0x41, 0x9d, 0xbf, 0x99,
        ])
        let rsacert_der = Data(_: [
            0x30, 0x82, 0x05, 0x76, 0x30, 0x82, 0x03, 0x5e, 0x02, 0x09, 0x00, 0xb1,
            0x43, 0xe0, 0x5e, 0x14, 0xb7, 0x38, 0x09, 0x30, 0x0d, 0x06, 0x09, 0x2a,
            0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x7d,
            0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55,
            0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x0c, 0x02,
            0x43, 0x41, 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0c,
            0x08, 0x53, 0x61, 0x6e, 0x20, 0x4a, 0x6f, 0x73, 0x65, 0x31, 0x12, 0x30,
            0x10, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x09, 0x41, 0x70, 0x70, 0x6c,
            0x65, 0x20, 0x49, 0x6e, 0x63, 0x31, 0x19, 0x30, 0x17, 0x06, 0x03, 0x55,
            0x04, 0x03, 0x0c, 0x10, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x65, 0x63, 0x75,
            0x72, 0x65, 0x74, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x31, 0x1f, 0x30, 0x1d,
            0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x09, 0x01, 0x16,
            0x10, 0x61, 0x61, 0x72, 0x74, 0x68, 0x69, 0x40, 0x61, 0x70, 0x70, 0x6c,
            0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x1e, 0x17, 0x0d, 0x32, 0x32, 0x31,
            0x31, 0x31, 0x38, 0x32, 0x31, 0x30, 0x39, 0x35, 0x39, 0x5a, 0x17, 0x0d,
            0x32, 0x33, 0x31, 0x31, 0x31, 0x38, 0x32, 0x31, 0x30, 0x39, 0x35, 0x39,
            0x5a, 0x30, 0x7d, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,
            0x13, 0x02, 0x55, 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
            0x08, 0x0c, 0x02, 0x43, 0x41, 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55,
            0x04, 0x07, 0x0c, 0x08, 0x53, 0x61, 0x6e, 0x20, 0x4a, 0x6f, 0x73, 0x65,
            0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x09, 0x41,
            0x70, 0x70, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x31, 0x19, 0x30, 0x17,
            0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x10, 0x77, 0x77, 0x77, 0x2e, 0x73,
            0x65, 0x63, 0x75, 0x72, 0x65, 0x74, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x31,
            0x1f, 0x30, 0x1d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01,
            0x09, 0x01, 0x16, 0x10, 0x61, 0x61, 0x72, 0x74, 0x68, 0x69, 0x40, 0x61,
            0x70, 0x70, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x82, 0x02, 0x22,
            0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
            0x01, 0x05, 0x00, 0x03, 0x82, 0x02, 0x0f, 0x00, 0x30, 0x82, 0x02, 0x0a,
            0x02, 0x82, 0x02, 0x01, 0x00, 0xbc, 0xb8, 0x62, 0xaf, 0x0f, 0x34, 0xd7,
            0xd8, 0xe2, 0x6e, 0x03, 0x1c, 0x36, 0x14, 0x12, 0xca, 0x67, 0x82, 0xbf,
            0xf4, 0x09, 0x45, 0x4c, 0x30, 0x88, 0x21, 0x0e, 0x22, 0xae, 0x7c, 0xf4,
            0x5d, 0x8a, 0x46, 0x67, 0x96, 0xea, 0x33, 0x97, 0x23, 0xfe, 0x46, 0xe6,
            0x08, 0x23, 0x60, 0x3f, 0x52, 0xb5, 0x59, 0x87, 0x6b, 0x61, 0x5e, 0x74,
            0xf5, 0xea, 0xa0, 0xd3, 0x01, 0x71, 0xb6, 0x09, 0x0e, 0xac, 0x42, 0xff,
            0xff, 0x35, 0x25, 0xcd, 0x2b, 0x6e, 0xee, 0x7a, 0x9f, 0xf3, 0x0f, 0x8e,
            0x7e, 0x7f, 0x66, 0x9d, 0xd2, 0xe0, 0x2f, 0x55, 0x5d, 0x6e, 0xb6, 0xbd,
            0x5f, 0xda, 0x04, 0x64, 0xb5, 0x68, 0x06, 0xcd, 0x5f, 0x12, 0x98, 0x8a,
            0xfc, 0x9a, 0x9c, 0x13, 0xa6, 0xf0, 0x0f, 0x63, 0x94, 0x31, 0x12, 0x38,
            0x52, 0x55, 0xdc, 0xd1, 0x86, 0x22, 0x0f, 0x76, 0x7c, 0xf5, 0x70, 0xe2,
            0x33, 0x96, 0x13, 0xea, 0x2d, 0xdb, 0x60, 0x77, 0x25, 0x11, 0x00, 0xe1,
            0x54, 0x2a, 0xcf, 0x10, 0xd4, 0x4c, 0x7e, 0x76, 0x60, 0xcc, 0x57, 0x3a,
            0xa8, 0xab, 0x3a, 0x8e, 0xc9, 0x0f, 0xb8, 0xd3, 0xe4, 0x21, 0xcb, 0x2a,
            0x1d, 0x09, 0xd0, 0x12, 0x60, 0xeb, 0xc7, 0x94, 0xeb, 0x9b, 0x60, 0x1c,
            0x21, 0x61, 0xbf, 0xbf, 0x7d, 0xe8, 0xa5, 0xa5, 0x10, 0xaf, 0x15, 0xdc,
            0x85, 0x57, 0x10, 0x61, 0x75, 0xde, 0x64, 0x2a, 0x29, 0xc3, 0x0b, 0xbd,
            0xdb, 0xa2, 0xd0, 0xab, 0x2b, 0xe5, 0xc8, 0xfd, 0x0b, 0x19, 0xa7, 0x99,
            0x6b, 0x78, 0x95, 0xc2, 0x9e, 0x8d, 0x40, 0xf1, 0xe1, 0x05, 0x44, 0x92,
            0xe4, 0xfb, 0x41, 0x40, 0xaf, 0x0c, 0x0c, 0xf8, 0xab, 0xd0, 0xf1, 0xc9,
            0x3c, 0x41, 0x7f, 0x92, 0x49, 0x3d, 0x3b, 0x85, 0x42, 0x93, 0xb2, 0x88,
            0x28, 0x8f, 0x53, 0xf2, 0x12, 0xbc, 0x94, 0xab, 0xa2, 0x68, 0x6b, 0xfb,
            0xa2, 0xc2, 0xe8, 0xce, 0xf6, 0xc8, 0x04, 0xd3, 0x71, 0xa3, 0x67, 0xa7,
            0x7a, 0xa3, 0x29, 0x7a, 0xce, 0xb5, 0x54, 0x83, 0xbd, 0x02, 0xc5, 0x08,
            0x4c, 0x01, 0x43, 0xaf, 0x57, 0x19, 0x6b, 0x75, 0xfd, 0xdc, 0xa6, 0x0e,
            0x5b, 0xdd, 0x4f, 0x5e, 0x3e, 0x9a, 0x20, 0xbc, 0x02, 0x0b, 0xe4, 0x5e,
            0x1a, 0x32, 0x61, 0x8e, 0x03, 0x9e, 0xa3, 0x10, 0x21, 0xd7, 0x76, 0xa0,
            0x7c, 0x35, 0x19, 0xcf, 0x71, 0x75, 0x6c, 0x84, 0x40, 0x5f, 0xe6, 0x85,
            0x63, 0x13, 0xca, 0x27, 0xc8, 0x7f, 0x2f, 0x25, 0x68, 0x07, 0xb8, 0x61,
            0xa8, 0x45, 0x15, 0x06, 0x69, 0x12, 0xf6, 0x29, 0x73, 0xdc, 0x12, 0x6c,
            0xdd, 0xda, 0x75, 0x19, 0x89, 0x87, 0x2f, 0x2a, 0x4e, 0x4a, 0x81, 0x24,
            0xf9, 0x41, 0xec, 0xa9, 0xc1, 0x3c, 0x3e, 0xa1, 0xf1, 0x22, 0x77, 0x84,
            0x5d, 0xf6, 0xe3, 0x4a, 0x74, 0xfb, 0x0f, 0xef, 0x59, 0xbc, 0x47, 0x9e,
            0x57, 0x0f, 0x56, 0x30, 0xd2, 0x88, 0x1e, 0xcd, 0xa1, 0xd2, 0xbb, 0xe8,
            0x65, 0x88, 0x07, 0x46, 0xcb, 0x67, 0xc8, 0x47, 0xdb, 0x35, 0xb9, 0x1c,
            0x0e, 0x5f, 0xa7, 0x67, 0xa3, 0x1c, 0xcd, 0x2e, 0x4f, 0x09, 0xfd, 0x4b,
            0xea, 0xef, 0x22, 0x9d, 0xf3, 0x2f, 0xfc, 0xd7, 0xa5, 0x91, 0xc5, 0xd6,
            0xf8, 0x0f, 0x0e, 0x92, 0xf0, 0x27, 0x84, 0xb1, 0x07, 0xae, 0xa2, 0xfc,
            0x42, 0xeb, 0xf2, 0xce, 0x6d, 0xad, 0x57, 0x06, 0x18, 0xca, 0xf5, 0x15,
            0xbf, 0x24, 0xcc, 0x96, 0x71, 0x99, 0xc8, 0x85, 0x33, 0x9b, 0x7a, 0x3f,
            0xab, 0xb1, 0xaf, 0x4f, 0x1c, 0xb6, 0x32, 0x23, 0x07, 0xe7, 0x3d, 0xf3,
            0xc7, 0xa4, 0xa4, 0x3c, 0x0b, 0xec, 0x44, 0xc5, 0x4d, 0xba, 0x43, 0x57,
            0x48, 0x5c, 0x78, 0xfe, 0xdf, 0x36, 0xb5, 0x4e, 0x3d, 0xb0, 0x47, 0x75,
            0x01, 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
            0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03, 0x82, 0x02,
            0x01, 0x00, 0x7f, 0x14, 0x15, 0xec, 0xcb, 0x71, 0x74, 0xd1, 0xcd, 0xe5,
            0x19, 0x78, 0x74, 0xdf, 0x81, 0x9b, 0xf4, 0x2c, 0x8a, 0x4f, 0x18, 0x80,
            0x4f, 0xb9, 0x65, 0x85, 0xd5, 0xe2, 0x89, 0xaa, 0x59, 0xa0, 0x44, 0x0f,
            0x9f, 0xd7, 0x9e, 0x3b, 0x2f, 0xfb, 0xdb, 0x60, 0x9e, 0x1e, 0x35, 0x67,
            0xf4, 0x9f, 0x27, 0xa4, 0x7b, 0x94, 0x9f, 0x6c, 0xf9, 0xc3, 0x68, 0xd7,
            0x47, 0x8e, 0xfb, 0xa3, 0xe8, 0x9e, 0x46, 0xd1, 0x29, 0x23, 0x1a, 0xe9,
            0x48, 0x11, 0x66, 0x48, 0x96, 0x99, 0x48, 0xa2, 0x15, 0x3f, 0x15, 0x39,
            0x1b, 0x75, 0xa2, 0x59, 0x47, 0x63, 0x9e, 0x41, 0x66, 0x21, 0xc7, 0xbc,
            0x74, 0xbb, 0x92, 0x1b, 0x33, 0xd3, 0xfa, 0x59, 0xa1, 0x6c, 0xf4, 0x6e,
            0xbb, 0xfa, 0xa1, 0x65, 0xb9, 0xf5, 0xae, 0xdd, 0xe4, 0x4b, 0xe9, 0x59,
            0x2f, 0x08, 0x5e, 0x48, 0xe6, 0x6a, 0xfd, 0x1f, 0x78, 0x8c, 0xd8, 0x11,
            0x1e, 0x40, 0x34, 0xb9, 0x03, 0x95, 0xae, 0x23, 0xb3, 0xa4, 0x53, 0x6d,
            0x51, 0x93, 0x29, 0x89, 0x32, 0x7b, 0xe5, 0x75, 0xc5, 0x07, 0xad, 0x2e,
            0x68, 0x13, 0x95, 0x0e, 0x5b, 0x46, 0x23, 0x8b, 0xa7, 0x4a, 0x4f, 0x9c,
            0xbd, 0xb6, 0xb7, 0x9e, 0x64, 0x9d, 0x1b, 0x3a, 0xcb, 0x39, 0xd4, 0xf0,
            0x84, 0x84, 0xc5, 0x79, 0x6d, 0xc2, 0xe7, 0xf6, 0x55, 0x11, 0x49, 0x99,
            0x4f, 0xef, 0x7a, 0xd4, 0xbc, 0xf2, 0x56, 0xf4, 0xa7, 0x38, 0xa4, 0x73,
            0x8a, 0x86, 0x37, 0xb6, 0x88, 0xc2, 0xf5, 0x04, 0xec, 0x3d, 0xed, 0x68,
            0x79, 0xc5, 0x77, 0xf7, 0xc2, 0xc8, 0xba, 0x4f, 0x4b, 0xa1, 0x7c, 0x3e,
            0x3a, 0xaa, 0x2d, 0x5b, 0xb7, 0x66, 0x59, 0x8d, 0x9d, 0x1b, 0x73, 0x1f,
            0xe5, 0x30, 0xb1, 0x8b, 0x7a, 0xd7, 0x0d, 0xfd, 0x02, 0xd5, 0x67, 0xf8,
            0xac, 0x41, 0x61, 0xfa, 0x79, 0xa0, 0x0c, 0x1f, 0x0d, 0xcf, 0xdb, 0xf8,
            0xdd, 0x27, 0x29, 0x67, 0xb6, 0x7c, 0x29, 0x90, 0xc0, 0xda, 0xda, 0x51,
            0x0c, 0x23, 0xa2, 0x7a, 0xed, 0x40, 0xa2, 0x9a, 0x27, 0x4d, 0xd6, 0x65,
            0xa4, 0xe5, 0xf0, 0xb0, 0xab, 0xbc, 0x76, 0x6e, 0xa8, 0xd0, 0x46, 0x41,
            0x57, 0x75, 0x93, 0x44, 0xac, 0x76, 0x19, 0xc8, 0xda, 0x2e, 0xba, 0x82,
            0x31, 0x8c, 0xb5, 0xc7, 0xbd, 0xad, 0x92, 0x22, 0xea, 0x11, 0xb0, 0x25,
            0xe3, 0xb8, 0x19, 0xd2, 0x64, 0x37, 0xb8, 0x97, 0xb6, 0x6d, 0x78, 0xd1,
            0x0d, 0xeb, 0xc6, 0x14, 0x21, 0xd5, 0x6e, 0x14, 0xbf, 0x09, 0x33, 0x80,
            0x7d, 0x33, 0xea, 0xcc, 0x2f, 0x27, 0x9c, 0xd5, 0x39, 0x32, 0x40, 0x67,
            0x28, 0x1e, 0xf0, 0x5d, 0xd9, 0x2f, 0x05, 0xfa, 0x6b, 0x9a, 0x66, 0x45,
            0xf8, 0xa1, 0x6d, 0xd4, 0xd0, 0x0d, 0x0d, 0x34, 0x5d, 0xda, 0xb2, 0xc1,
            0x0b, 0x5b, 0x77, 0x14, 0xc8, 0x8b, 0xca, 0x8a, 0x42, 0x89, 0xd8, 0xb2,
            0x59, 0x70, 0x82, 0x98, 0xde, 0xf2, 0x58, 0xb7, 0xb1, 0x0d, 0x30, 0x94,
            0xba, 0x06, 0x39, 0x99, 0x57, 0x26, 0x99, 0x4a, 0xe2, 0x1d, 0xe6, 0x78,
            0xf8, 0x79, 0x0d, 0x9d, 0xe0, 0x36, 0xc9, 0xf3, 0xa8, 0x0d, 0xa8, 0xba,
            0xdc, 0xc8, 0x39, 0xa9, 0x33, 0x57, 0xeb, 0x4f, 0x46, 0xcc, 0x21, 0x8b,
            0x80, 0xbc, 0x47, 0x4f, 0x0c, 0x7d, 0x97, 0x76, 0x1e, 0xf4, 0x5f, 0xa5,
            0x2f, 0x5e, 0xa7, 0x6d, 0x86, 0xaa, 0xd2, 0xeb, 0xec, 0xbc, 0x1f, 0x96,
            0xfb, 0x41, 0xf8, 0x58, 0xb2, 0x70, 0x1a, 0x69, 0x55, 0xc3, 0xcf, 0xee,
            0xc8, 0xaa, 0xc8, 0x17, 0x88, 0x06, 0xf7, 0x56, 0xe2, 0xb0, 0x84, 0x7b,
            0xcc, 0x59, 0x10, 0x0a, 0x89, 0xcd, 0xec, 0x67, 0x57, 0x70, 0xc7, 0x42,
            0x95, 0x82, 0x79, 0x33, 0x12, 0xda, 0x65, 0xd6, 0x84, 0xdd,
        ])

        let rsakey_der = Data(_: [
            0x30, 0x82, 0x09, 0x28, 0x02, 0x01, 0x00, 0x02, 0x82, 0x02, 0x01, 0x00,
            0xbc, 0xb8, 0x62, 0xaf, 0x0f, 0x34, 0xd7, 0xd8, 0xe2, 0x6e, 0x03, 0x1c,
            0x36, 0x14, 0x12, 0xca, 0x67, 0x82, 0xbf, 0xf4, 0x09, 0x45, 0x4c, 0x30,
            0x88, 0x21, 0x0e, 0x22, 0xae, 0x7c, 0xf4, 0x5d, 0x8a, 0x46, 0x67, 0x96,
            0xea, 0x33, 0x97, 0x23, 0xfe, 0x46, 0xe6, 0x08, 0x23, 0x60, 0x3f, 0x52,
            0xb5, 0x59, 0x87, 0x6b, 0x61, 0x5e, 0x74, 0xf5, 0xea, 0xa0, 0xd3, 0x01,
            0x71, 0xb6, 0x09, 0x0e, 0xac, 0x42, 0xff, 0xff, 0x35, 0x25, 0xcd, 0x2b,
            0x6e, 0xee, 0x7a, 0x9f, 0xf3, 0x0f, 0x8e, 0x7e, 0x7f, 0x66, 0x9d, 0xd2,
            0xe0, 0x2f, 0x55, 0x5d, 0x6e, 0xb6, 0xbd, 0x5f, 0xda, 0x04, 0x64, 0xb5,
            0x68, 0x06, 0xcd, 0x5f, 0x12, 0x98, 0x8a, 0xfc, 0x9a, 0x9c, 0x13, 0xa6,
            0xf0, 0x0f, 0x63, 0x94, 0x31, 0x12, 0x38, 0x52, 0x55, 0xdc, 0xd1, 0x86,
            0x22, 0x0f, 0x76, 0x7c, 0xf5, 0x70, 0xe2, 0x33, 0x96, 0x13, 0xea, 0x2d,
            0xdb, 0x60, 0x77, 0x25, 0x11, 0x00, 0xe1, 0x54, 0x2a, 0xcf, 0x10, 0xd4,
            0x4c, 0x7e, 0x76, 0x60, 0xcc, 0x57, 0x3a, 0xa8, 0xab, 0x3a, 0x8e, 0xc9,
            0x0f, 0xb8, 0xd3, 0xe4, 0x21, 0xcb, 0x2a, 0x1d, 0x09, 0xd0, 0x12, 0x60,
            0xeb, 0xc7, 0x94, 0xeb, 0x9b, 0x60, 0x1c, 0x21, 0x61, 0xbf, 0xbf, 0x7d,
            0xe8, 0xa5, 0xa5, 0x10, 0xaf, 0x15, 0xdc, 0x85, 0x57, 0x10, 0x61, 0x75,
            0xde, 0x64, 0x2a, 0x29, 0xc3, 0x0b, 0xbd, 0xdb, 0xa2, 0xd0, 0xab, 0x2b,
            0xe5, 0xc8, 0xfd, 0x0b, 0x19, 0xa7, 0x99, 0x6b, 0x78, 0x95, 0xc2, 0x9e,
            0x8d, 0x40, 0xf1, 0xe1, 0x05, 0x44, 0x92, 0xe4, 0xfb, 0x41, 0x40, 0xaf,
            0x0c, 0x0c, 0xf8, 0xab, 0xd0, 0xf1, 0xc9, 0x3c, 0x41, 0x7f, 0x92, 0x49,
            0x3d, 0x3b, 0x85, 0x42, 0x93, 0xb2, 0x88, 0x28, 0x8f, 0x53, 0xf2, 0x12,
            0xbc, 0x94, 0xab, 0xa2, 0x68, 0x6b, 0xfb, 0xa2, 0xc2, 0xe8, 0xce, 0xf6,
            0xc8, 0x04, 0xd3, 0x71, 0xa3, 0x67, 0xa7, 0x7a, 0xa3, 0x29, 0x7a, 0xce,
            0xb5, 0x54, 0x83, 0xbd, 0x02, 0xc5, 0x08, 0x4c, 0x01, 0x43, 0xaf, 0x57,
            0x19, 0x6b, 0x75, 0xfd, 0xdc, 0xa6, 0x0e, 0x5b, 0xdd, 0x4f, 0x5e, 0x3e,
            0x9a, 0x20, 0xbc, 0x02, 0x0b, 0xe4, 0x5e, 0x1a, 0x32, 0x61, 0x8e, 0x03,
            0x9e, 0xa3, 0x10, 0x21, 0xd7, 0x76, 0xa0, 0x7c, 0x35, 0x19, 0xcf, 0x71,
            0x75, 0x6c, 0x84, 0x40, 0x5f, 0xe6, 0x85, 0x63, 0x13, 0xca, 0x27, 0xc8,
            0x7f, 0x2f, 0x25, 0x68, 0x07, 0xb8, 0x61, 0xa8, 0x45, 0x15, 0x06, 0x69,
            0x12, 0xf6, 0x29, 0x73, 0xdc, 0x12, 0x6c, 0xdd, 0xda, 0x75, 0x19, 0x89,
            0x87, 0x2f, 0x2a, 0x4e, 0x4a, 0x81, 0x24, 0xf9, 0x41, 0xec, 0xa9, 0xc1,
            0x3c, 0x3e, 0xa1, 0xf1, 0x22, 0x77, 0x84, 0x5d, 0xf6, 0xe3, 0x4a, 0x74,
            0xfb, 0x0f, 0xef, 0x59, 0xbc, 0x47, 0x9e, 0x57, 0x0f, 0x56, 0x30, 0xd2,
            0x88, 0x1e, 0xcd, 0xa1, 0xd2, 0xbb, 0xe8, 0x65, 0x88, 0x07, 0x46, 0xcb,
            0x67, 0xc8, 0x47, 0xdb, 0x35, 0xb9, 0x1c, 0x0e, 0x5f, 0xa7, 0x67, 0xa3,
            0x1c, 0xcd, 0x2e, 0x4f, 0x09, 0xfd, 0x4b, 0xea, 0xef, 0x22, 0x9d, 0xf3,
            0x2f, 0xfc, 0xd7, 0xa5, 0x91, 0xc5, 0xd6, 0xf8, 0x0f, 0x0e, 0x92, 0xf0,
            0x27, 0x84, 0xb1, 0x07, 0xae, 0xa2, 0xfc, 0x42, 0xeb, 0xf2, 0xce, 0x6d,
            0xad, 0x57, 0x06, 0x18, 0xca, 0xf5, 0x15, 0xbf, 0x24, 0xcc, 0x96, 0x71,
            0x99, 0xc8, 0x85, 0x33, 0x9b, 0x7a, 0x3f, 0xab, 0xb1, 0xaf, 0x4f, 0x1c,
            0xb6, 0x32, 0x23, 0x07, 0xe7, 0x3d, 0xf3, 0xc7, 0xa4, 0xa4, 0x3c, 0x0b,
            0xec, 0x44, 0xc5, 0x4d, 0xba, 0x43, 0x57, 0x48, 0x5c, 0x78, 0xfe, 0xdf,
            0x36, 0xb5, 0x4e, 0x3d, 0xb0, 0x47, 0x75, 0x01, 0x02, 0x03, 0x01, 0x00,
            0x01, 0x02, 0x82, 0x02, 0x00, 0x74, 0x99, 0x0b, 0x47, 0x93, 0x82, 0x97,
            0x95, 0x85, 0x98, 0x68, 0xcd, 0x86, 0x4f, 0xf2, 0xa8, 0x21, 0x39, 0xf4,
            0x34, 0xe7, 0x81, 0x6c, 0x28, 0x54, 0x02, 0xf0, 0x43, 0xd7, 0x40, 0x96,
            0x8e, 0x30, 0x7f, 0x7d, 0x43, 0x0d, 0xa2, 0x20, 0x50, 0x79, 0xaa, 0xfe,
            0x36, 0xaa, 0xfc, 0xad, 0x43, 0x01, 0x8e, 0xb6, 0x0f, 0x4f, 0x12, 0x57,
            0xfb, 0x14, 0x22, 0x97, 0x1b, 0xbe, 0x50, 0xb4, 0xd9, 0xde, 0xee, 0x6a,
            0x52, 0x18, 0x59, 0x29, 0xa1, 0x1b, 0x21, 0xb6, 0x9b, 0x9a, 0x45, 0xd3,
            0x49, 0x2e, 0x97, 0x8d, 0x0d, 0x1b, 0xbb, 0xc2, 0xe7, 0x3e, 0x1f, 0x23,
            0x73, 0xd4, 0x34, 0x80, 0xb0, 0x5f, 0xfc, 0x4b, 0xe8, 0xe0, 0x89, 0x64,
            0xdd, 0xda, 0xfc, 0x71, 0x5b, 0xe3, 0xd7, 0xee, 0x33, 0x41, 0xfa, 0x3a,
            0xd8, 0x0b, 0xfa, 0xa9, 0x6d, 0x51, 0x1f, 0xf2, 0x9a, 0x13, 0xde, 0xd1,
            0xb3, 0x03, 0x97, 0x7c, 0x49, 0x26, 0xd0, 0x3b, 0xec, 0xa7, 0xcb, 0xbe,
            0x6c, 0x0d, 0x22, 0xf0, 0x07, 0xea, 0xd6, 0xfb, 0x76, 0xa4, 0xe9, 0x83,
            0xf1, 0x70, 0x11, 0x76, 0xe4, 0x9c, 0x95, 0x1a, 0x3d, 0x49, 0xef, 0xc7,
            0x2e, 0x37, 0xc0, 0xd9, 0x8a, 0x0e, 0x42, 0xba, 0x2c, 0xb3, 0x4b, 0xb7,
            0x35, 0x9c, 0xba, 0x26, 0xaa, 0xb9, 0x11, 0x96, 0xa1, 0x6f, 0x3b, 0x77,
            0x8a, 0xde, 0x96, 0xdd, 0x50, 0x40, 0xbd, 0xec, 0x1a, 0xef, 0x4a, 0x12,
            0xdc, 0x5f, 0x84, 0xc3, 0x2d, 0x15, 0x04, 0x8f, 0xea, 0xca, 0xc7, 0xf5,
            0x0f, 0x24, 0x6a, 0x8a, 0xdb, 0x00, 0xf4, 0xce, 0x3c, 0xb3, 0xcf, 0x81,
            0x5e, 0x7e, 0x29, 0xfb, 0xb7, 0xeb, 0x1f, 0x1c, 0x88, 0xb3, 0x48, 0x9f,
            0x87, 0x5e, 0x04, 0x5e, 0xb2, 0x67, 0x65, 0x9d, 0xd8, 0xdb, 0x7e, 0x23,
            0x87, 0xc3, 0xbe, 0x1e, 0xc3, 0x1a, 0xc6, 0x54, 0x1f, 0xab, 0x8b, 0xe6,
            0x44, 0xda, 0x29, 0x23, 0xf2, 0xd2, 0x82, 0xc8, 0xdb, 0x86, 0x11, 0xfb,
            0xdd, 0x46, 0xb8, 0x1d, 0x84, 0x7d, 0x22, 0x78, 0x34, 0xe9, 0x96, 0xcd,
            0x12, 0xc5, 0xc6, 0xc9, 0xfa, 0x83, 0x56, 0x60, 0x22, 0xd1, 0x44, 0x1f,
            0xa7, 0x9e, 0x1d, 0xfa, 0x9d, 0x1a, 0x71, 0xcb, 0xe2, 0xd2, 0x4a, 0xc0,
            0x87, 0x1e, 0xc1, 0x7a, 0x30, 0x11, 0x1f, 0x09, 0x6f, 0xe7, 0x2a, 0xe1,
            0xd6, 0xbb, 0x5e, 0x9f, 0x89, 0x68, 0x70, 0x49, 0x60, 0xbf, 0xa1, 0x3a,
            0x34, 0x07, 0x43, 0x04, 0x06, 0x84, 0xac, 0x75, 0x30, 0xa2, 0x4a, 0x29,
            0x9f, 0x77, 0x64, 0xa4, 0xb6, 0x7d, 0x16, 0xd5, 0xe7, 0x07, 0x21, 0xae,
            0xbe, 0xc4, 0x7f, 0x17, 0x85, 0xfb, 0x78, 0x94, 0x38, 0x55, 0x26, 0xd0,
            0x80, 0xe9, 0x45, 0xd5, 0x23, 0xc1, 0x85, 0x3a, 0x82, 0x44, 0x4c, 0x61,
            0x33, 0x6e, 0x91, 0xb0, 0x5d, 0xeb, 0xb2, 0x00, 0xa9, 0x06, 0x0c, 0xa7,
            0x20, 0x73, 0xd4, 0x21, 0x78, 0xe1, 0xcf, 0x35, 0x2c, 0xdd, 0xb0, 0x30,
            0xc6, 0xc6, 0x53, 0x42, 0x86, 0xe1, 0xc4, 0xd6, 0x70, 0x4f, 0x1c, 0xcc,
            0x6b, 0x07, 0x6d, 0xc8, 0x8f, 0x17, 0xc3, 0x31, 0xa1, 0xd4, 0x5e, 0x16,
            0xe6, 0xbb, 0xfa, 0xfc, 0x2b, 0xc6, 0x2c, 0x98, 0x05, 0x3a, 0xb1, 0x06,
            0xe2, 0xf1, 0x61, 0x25, 0xac, 0xcd, 0x2b, 0x29, 0x8d, 0x31, 0xfa, 0x7a,
            0x68, 0x6a, 0xb6, 0x46, 0x57, 0xd4, 0x6e, 0xf5, 0xde, 0xc0, 0x3b, 0x21,
            0x3b, 0x94, 0x39, 0x8b, 0xa6, 0x12, 0x9c, 0xf5, 0x82, 0x66, 0x02, 0x98,
            0x78, 0x03, 0xe4, 0x68, 0x3f, 0xe6, 0x98, 0x46, 0x70, 0xc0, 0x1b, 0x82,
            0xae, 0x79, 0x42, 0x61, 0x8e, 0xf3, 0x7b, 0x19, 0x13, 0x9b, 0x3b, 0xce,
            0x79, 0x00, 0xd8, 0x24, 0xa7, 0x97, 0x27, 0xa3, 0xd6, 0xe3, 0x37, 0x34,
            0x01, 0x02, 0x82, 0x01, 0x01, 0x00, 0xf3, 0xbc, 0x0f, 0x12, 0xc5, 0x72,
            0xc6, 0x22, 0xdc, 0x65, 0x91, 0x6d, 0xd8, 0xeb, 0x5c, 0xeb, 0x8d, 0x97,
            0x14, 0x24, 0x4c, 0x09, 0xa7, 0xbe, 0x8d, 0x09, 0x68, 0x50, 0xaa, 0x65,
            0x5a, 0xe8, 0x16, 0x82, 0x8b, 0x37, 0x0c, 0xf0, 0x5a, 0x36, 0x89, 0xf7,
            0x8f, 0x59, 0x73, 0x24, 0x8d, 0xf7, 0x60, 0xe7, 0xbc, 0xd1, 0xdc, 0xb8,
            0xdd, 0x41, 0xd8, 0xee, 0x31, 0xe2, 0x6b, 0x24, 0xfa, 0x69, 0xf2, 0xde,
            0x32, 0x78, 0xd7, 0x3f, 0x43, 0x34, 0xb1, 0x99, 0x00, 0x51, 0x69, 0xf3,
            0xda, 0x14, 0x1c, 0x04, 0xc6, 0x8b, 0x17, 0xeb, 0x60, 0xf8, 0x8c, 0x5a,
            0xb3, 0x59, 0x40, 0x94, 0x85, 0x7c, 0x18, 0xf4, 0x07, 0xe9, 0xd3, 0x46,
            0x56, 0xd2, 0x22, 0xc6, 0x65, 0x89, 0x76, 0x7b, 0xae, 0x0f, 0xd2, 0x54,
            0x8c, 0xc6, 0x2a, 0x56, 0x86, 0xd6, 0x68, 0x88, 0xc3, 0xcd, 0x02, 0x11,
            0xc4, 0x72, 0xc7, 0x24, 0x46, 0x4c, 0x39, 0x9e, 0x28, 0xff, 0x2e, 0xcf,
            0x9b, 0x79, 0x00, 0x0b, 0xa1, 0x50, 0x06, 0x22, 0x62, 0x1b, 0x35, 0xe4,
            0xef, 0x4c, 0xb9, 0xdd, 0xa0, 0xaf, 0xa7, 0xea, 0x5e, 0x88, 0x0b, 0x94,
            0x14, 0x74, 0x9c, 0x32, 0x95, 0x1a, 0xf1, 0x3e, 0x69, 0x1a, 0x61, 0x75,
            0x61, 0x10, 0xe8, 0xfd, 0x21, 0xb5, 0x34, 0x1f, 0x89, 0xe6, 0xfb, 0x7b,
            0x03, 0xea, 0x36, 0xf6, 0x80, 0xf6, 0x26, 0xab, 0xce, 0x96, 0x53, 0xb6,
            0x46, 0x27, 0x61, 0x07, 0x47, 0x6f, 0x67, 0xf4, 0x1a, 0xec, 0x8d, 0x19,
            0x55, 0xae, 0x8a, 0x75, 0xd1, 0x62, 0xe1, 0x5f, 0xb7, 0x59, 0xc2, 0x40,
            0xcb, 0x4f, 0xdf, 0xee, 0xdf, 0x71, 0x76, 0x9b, 0xf1, 0x02, 0xaf, 0xac,
            0x9d, 0xad, 0xc4, 0xd4, 0xfe, 0xb8, 0xc9, 0xc0, 0xd4, 0x75, 0x28, 0xd3,
            0x46, 0x4c, 0xcb, 0x22, 0x39, 0x69, 0x2a, 0x87, 0x5e, 0xe1, 0x02, 0x82,
            0x01, 0x01, 0x00, 0xc6, 0x37, 0x98, 0xf3, 0x4c, 0xac, 0xa3, 0xea, 0x95,
            0x51, 0x4e, 0x87, 0xfc, 0x7f, 0xae, 0x32, 0xbc, 0x57, 0x6a, 0xfe, 0x20,
            0xd8, 0x29, 0xa4, 0xa8, 0x6d, 0x7b, 0x77, 0x62, 0xb8, 0x2b, 0x5e, 0x27,
            0x64, 0x07, 0xb1, 0xaa, 0xaf, 0xac, 0x31, 0xa1, 0x60, 0x63, 0xad, 0xf1,
            0xdd, 0x6e, 0x95, 0x44, 0x2b, 0x20, 0x43, 0x26, 0x00, 0xd8, 0x0c, 0x12,
            0x33, 0x53, 0x3b, 0x3a, 0x40, 0xd6, 0x62, 0x17, 0x1b, 0x07, 0x34, 0xc4,
            0xef, 0x5a, 0x4a, 0x6c, 0x9b, 0x63, 0x2f, 0x88, 0xa6, 0x8e, 0x15, 0x0a,
            0x28, 0xb5, 0x68, 0xe1, 0x3d, 0xda, 0x03, 0xc2, 0x3c, 0x6b, 0x6f, 0x0d,
            0x09, 0xdc, 0x46, 0xa2, 0x41, 0xbb, 0x21, 0x84, 0x22, 0x0b, 0xd0, 0xbe,
            0xbb, 0xd5, 0x8c, 0x8e, 0x7a, 0xfc, 0xc0, 0x98, 0x3c, 0x74, 0x72, 0x83,
            0xc5, 0xe6, 0xcb, 0xce, 0x1a, 0x71, 0x6f, 0xb5, 0x54, 0x06, 0x3d, 0xe9,
            0x3d, 0xad, 0xb3, 0x16, 0xe1, 0x3d, 0x5e, 0xd6, 0x9a, 0x29, 0x75, 0x40,
            0xe2, 0x5a, 0x09, 0x49, 0xdf, 0x09, 0x4d, 0x9b, 0x9b, 0x40, 0x8c, 0xcb,
            0x9e, 0xf8, 0xff, 0xfb, 0x9b, 0x9e, 0xd4, 0xa1, 0xd9, 0x32, 0x69, 0xd9,
            0x3f, 0x94, 0x2b, 0xb4, 0xf4, 0x19, 0x91, 0x54, 0x8b, 0x03, 0x85, 0xb8,
            0xbe, 0x22, 0x34, 0x67, 0x24, 0xec, 0x19, 0xb1, 0x34, 0xaa, 0x61, 0x69,
            0xbc, 0xa8, 0xbc, 0x43, 0x94, 0x0a, 0x75, 0x89, 0xdc, 0x7d, 0x0e, 0xda,
            0x24, 0x9f, 0xc7, 0x52, 0x97, 0x76, 0x62, 0x0b, 0x76, 0x61, 0xbc, 0x53,
            0x29, 0x81, 0x42, 0x5c, 0xc4, 0x25, 0x88, 0xfe, 0xa5, 0xa3, 0x8e, 0x3a,
            0x2f, 0xe2, 0xba, 0x7a, 0xff, 0xfb, 0x5c, 0x0f, 0xfd, 0x76, 0x2f, 0xd7,
            0x9f, 0x57, 0x84, 0xa8, 0x49, 0x58, 0x87, 0x86, 0xeb, 0x2c, 0xf6, 0x6a,
            0x97, 0xd5, 0xf9, 0xd6, 0x3d, 0x7a, 0x21, 0x02, 0x82, 0x01, 0x00, 0x5b,
            0x82, 0xba, 0x2e, 0x14, 0x10, 0x19, 0xb0, 0x31, 0x0b, 0xb9, 0x64, 0x82,
            0xd3, 0x2b, 0x9a, 0x0d, 0x19, 0x32, 0x28, 0xc6, 0x9b, 0xc1, 0x6d, 0x5b,
            0xca, 0xb2, 0x6d, 0xc6, 0xec, 0x33, 0x0b, 0x7c, 0x98, 0x1a, 0xe8, 0xda,
            0x64, 0xcb, 0x9a, 0x3a, 0x86, 0xc6, 0x3d, 0x91, 0x6b, 0xa2, 0x19, 0xc5,
            0x3a, 0x7c, 0xbc, 0x56, 0xa0, 0xda, 0x01, 0xc5, 0x0e, 0xf9, 0x8f, 0xc7,
            0x26, 0xa5, 0x16, 0x6e, 0x67, 0x5a, 0x8f, 0xe0, 0x51, 0x12, 0x4c, 0x90,
            0x79, 0x9f, 0x92, 0xf1, 0xb2, 0xea, 0xa8, 0x2e, 0x34, 0xe4, 0xce, 0x88,
            0x76, 0x89, 0x7c, 0x08, 0x46, 0x6d, 0x9c, 0x0f, 0x11, 0x34, 0x64, 0xf9,
            0x81, 0x76, 0x0f, 0x26, 0x91, 0xfc, 0x3a, 0xfd, 0x6f, 0x7b, 0xe3, 0xf6,
            0xa6, 0x4d, 0x1e, 0x07, 0x9c, 0x53, 0x16, 0x7c, 0x02, 0xec, 0xb1, 0x47,
            0xa2, 0x41, 0xd1, 0x90, 0xfb, 0x56, 0xc4, 0xb9, 0x5c, 0x37, 0x40, 0x9b,
            0x49, 0x74, 0x9f, 0x0a, 0xd6, 0x4b, 0xcb, 0x4c, 0x67, 0x11, 0x73, 0xd8,
            0x39, 0xc4, 0x97, 0xee, 0xce, 0x3b, 0xc2, 0x94, 0xee, 0x4f, 0x4c, 0x64,
            0x41, 0x2c, 0xa8, 0xeb, 0x9f, 0xf7, 0x66, 0x28, 0xd7, 0x1d, 0x00, 0x76,
            0x9f, 0x36, 0x1a, 0xff, 0x88, 0x70, 0x9f, 0x46, 0xba, 0xf3, 0x92, 0xf3,
            0x34, 0xfc, 0x33, 0xcb, 0x2b, 0xce, 0xb6, 0x7b, 0x58, 0x65, 0xe7, 0x05,
            0x71, 0xf0, 0x28, 0xa4, 0xd9, 0x84, 0xd1, 0x78, 0x2e, 0xa1, 0x75, 0x84,
            0x94, 0x34, 0x1f, 0xa8, 0x82, 0x60, 0x97, 0x1d, 0xc9, 0x4a, 0x8a, 0x53,
            0x8f, 0xfa, 0x69, 0x2a, 0xf3, 0xe4, 0xe1, 0xe2, 0x73, 0xef, 0x54, 0xcc,
            0x71, 0x94, 0x35, 0xab, 0xfb, 0xa5, 0x5f, 0xfe, 0xcc, 0xf1, 0xae, 0x33,
            0xa1, 0xc0, 0xa3, 0x14, 0x66, 0xee, 0xb8, 0x1a, 0x74, 0x89, 0x15, 0xa1,
            0x30, 0x1e, 0x41, 0x02, 0x82, 0x01, 0x00, 0x6f, 0x48, 0xa3, 0x8c, 0x65,
            0x0d, 0xbf, 0xf1, 0x61, 0xe7, 0x86, 0x09, 0x7e, 0xcf, 0x48, 0x43, 0x9f,
            0xce, 0x0c, 0x79, 0xa4, 0x82, 0xf7, 0xce, 0x43, 0xe9, 0x43, 0x9a, 0x21,
            0x48, 0x78, 0xc0, 0xa1, 0xa8, 0xdd, 0x50, 0xf8, 0x1d, 0x2c, 0xb5, 0xa8,
            0x7e, 0x6f, 0x38, 0x27, 0x44, 0x44, 0x63, 0x75, 0x24, 0x29, 0x36, 0xc9,
            0xcd, 0x4b, 0x7e, 0x6b, 0x71, 0x79, 0x57, 0x15, 0x3b, 0x75, 0xa1, 0x18,
            0x8b, 0xca, 0x1d, 0xec, 0x3a, 0xdd, 0x1c, 0x4f, 0xa1, 0x65, 0xac, 0x38,
            0x32, 0x1a, 0x2e, 0xe1, 0xc7, 0x3d, 0x22, 0x26, 0xe3, 0x0c, 0xd5, 0x73,
            0x65, 0x6c, 0x83, 0xaa, 0x74, 0x50, 0xc1, 0x2f, 0x33, 0x6c, 0x16, 0x43,
            0x12, 0xc2, 0x43, 0x6d, 0xf2, 0x12, 0xd0, 0x98, 0xe5, 0x9f, 0xa5, 0x99,
            0x52, 0xc7, 0xa5, 0xcb, 0x29, 0x7e, 0x8c, 0x09, 0xa8, 0x7a, 0xeb, 0x56,
            0x88, 0x58, 0x00, 0xc6, 0x44, 0x24, 0x93, 0x19, 0x53, 0x57, 0x9b, 0x39,
            0x2c, 0xcf, 0xfd, 0xce, 0x71, 0xc6, 0x4e, 0xd4, 0xb4, 0x6d, 0x8a, 0xae,
            0xc4, 0x19, 0x17, 0x72, 0xf2, 0x4b, 0xa5, 0x9b, 0xe3, 0x20, 0xe7, 0x0b,
            0xfe, 0xde, 0xf8, 0xe2, 0x49, 0x79, 0xac, 0x98, 0x29, 0x3b, 0x79, 0x86,
            0x57, 0x8d, 0xa0, 0xb3, 0xb9, 0xbb, 0x86, 0x64, 0x2a, 0x2c, 0x8b, 0xb8,
            0x1b, 0x73, 0x54, 0xc1, 0x82, 0x73, 0xd1, 0x4e, 0xb7, 0x7c, 0xaf, 0xc4,
            0xb8, 0x8f, 0x55, 0x99, 0x4f, 0x5a, 0x8d, 0x13, 0x67, 0x89, 0xc5, 0x3d,
            0xde, 0x36, 0xbc, 0xfe, 0x8b, 0x9c, 0xd0, 0x5f, 0x38, 0x98, 0x42, 0x33,
            0x85, 0x57, 0x2f, 0xf0, 0xa7, 0x15, 0xc9, 0xd0, 0x68, 0x8a, 0xfc, 0x82,
            0xd5, 0xb0, 0x56, 0xe7, 0xdd, 0xc3, 0xca, 0xec, 0x98, 0x51, 0x25, 0xb5,
            0xaf, 0xaf, 0x4c, 0xa1, 0x47, 0xa1, 0x90, 0x64, 0xa1, 0x9b, 0x41, 0x02,
            0x82, 0x01, 0x01, 0x00, 0x94, 0x26, 0xb3, 0xd1, 0xac, 0x04, 0x71, 0x5b,
            0x32, 0x4b, 0x15, 0x59, 0x51, 0x43, 0xc3, 0xfa, 0x73, 0x29, 0x23, 0x23,
            0xed, 0x18, 0x47, 0xa1, 0x24, 0x25, 0xdc, 0x65, 0x2f, 0xfc, 0x18, 0xc5,
            0xf7, 0xf7, 0x6c, 0xad, 0x98, 0x6d, 0x96, 0x56, 0x33, 0x94, 0x87, 0xc3,
            0x8c, 0x64, 0x46, 0x3a, 0xa8, 0xa2, 0x43, 0x8d, 0x64, 0x9b, 0xd7, 0xa3,
            0x33, 0x5f, 0xa8, 0x7b, 0x55, 0x1b, 0x4b, 0x43, 0xb6, 0x8e, 0xa1, 0xeb,
            0x71, 0x0c, 0xf8, 0x50, 0xf0, 0xd6, 0x03, 0x17, 0xaa, 0x4f, 0x99, 0x57,
            0xa7, 0xce, 0xd3, 0x77, 0xa6, 0xd3, 0x85, 0xd0, 0x1d, 0x8e, 0x82, 0x6c,
            0xb7, 0xb5, 0x25, 0x1e, 0x8e, 0xb4, 0xdb, 0xe9, 0x36, 0xd5, 0xf3, 0x68,
            0xac, 0x47, 0x83, 0x74, 0x17, 0x82, 0x3f, 0x92, 0x9d, 0x66, 0x7f, 0x6c,
            0x11, 0xf6, 0x86, 0x18, 0x99, 0xea, 0xfe, 0xaf, 0xa7, 0xb3, 0x21, 0x92,
            0xed, 0x75, 0xbb, 0xf2, 0x29, 0xc3, 0x01, 0x36, 0xca, 0x71, 0x9d, 0x00,
            0xe6, 0x0b, 0xc6, 0xaf, 0xcc, 0x1d, 0x4f, 0x47, 0xef, 0x25, 0x04, 0x21,
            0xb0, 0x17, 0x90, 0xd2, 0x1d, 0x12, 0xe5, 0xd3, 0xca, 0xdb, 0x38, 0xac,
            0xe4, 0x2c, 0xcf, 0x20, 0x83, 0xaa, 0xbc, 0x5f, 0xf5, 0x76, 0x38, 0x91,
            0x7b, 0x36, 0xae, 0xc2, 0x1e, 0xd2, 0x1c, 0xe0, 0xff, 0x59, 0x65, 0xe9,
            0xe8, 0x66, 0x67, 0x95, 0x2b, 0x40, 0x6e, 0x9d, 0x01, 0x0f, 0xe1, 0x5a,
            0xe8, 0x92, 0xc9, 0x3a, 0x2a, 0xdd, 0xe8, 0x0a, 0x7e, 0x8c, 0x71, 0xc9,
            0xe8, 0x4b, 0x9a, 0x69, 0x7e, 0xba, 0x0f, 0x18, 0xc6, 0xb8, 0x46, 0x60,
            0x36, 0xb4, 0x62, 0xcf, 0xdc, 0x2c, 0x5d, 0x1f, 0xbd, 0xf2, 0x33, 0xbd,
            0x62, 0x13, 0x2a, 0x87, 0x0f, 0x5e, 0xb4, 0xa6, 0x12, 0xa8, 0xc1, 0x2b,
            0xbf, 0xf8, 0xbe, 0xaa, 0xf8, 0xe9, 0xaf, 0x96,
        ])

        let nis = try newCert.normalizedIssuerSequence
        print(nis as NSData)
        let nss = try newCert.normalizedSubjectSequence
        print(nss as NSData)
        let certData = newCert.derRepresentation
        print(nss as NSData)
        let summary = try newCert.subjectSummary
        print("summary = \(String(describing: summary))")
        let publicKey = try newCert.publicKey
        print(publicKey as NSData)
        let serialNumber = try newCert.serialNumberData
        print(serialNumber as NSData)
        let email = try newCert.emailAddresses
        let emailCert = try Certificate(derRepresentation: mail_google_com)
        XCTAssertNotNil(emailCert)
        let cname = try emailCert.commonName
        print("common name = \(String(describing: cname))")
        let noEmail = try emailCert.emailAddresses
        XCTAssertEqual(noEmail.count, 0)
        let publicKey2 = try emailCert.publicKey
        print(publicKey2 as NSData)
        let emailcert2 = try Certificate(derRepresentation: mail_aarthi)
        XCTAssertNotNil(emailcert2)
        XCTAssertNotNil(publicKey2)
        let email2 = try emailcert2.emailAddresses
        // Identity
        var keyAttributes: [String: String] = [:]
        keyAttributes[kSecAttrKeyClass as String] = kSecAttrKeyClassPrivate as String
        keyAttributes[kSecAttrKeyType as String] = kSecAttrKeyTypeRSA as String

        guard let key = SecKeyCreateWithData(rsakey_der as CFData, keyAttributes as CFDictionary, nil) else {
            return
        }
        let identity = try DigitalIdentity(certificate: emailcert2, privateKey: key)
        let publicKey3 = try identity.publicKey
        print(publicKey3 as NSData)
        let secCert = identity.secCertificate
        let privkey = identity.privateKey
    }
}
